﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Top.ascx.cs" Inherits="RCSP.FrontEnd.UserControls.Top" %>
<%@ Import Namespace="RCSP.FrontEnd" %>

<script type="text/javascript" language="javascript">

    function MM_swapImgRestore() { //v3.0
        var i, x, a = document.MM_sr;
        for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc;
    }


    function MM_findObj(n, d) { //v4.01
        var p, i, x;
        if (!d) d = document;
        if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
            d = parent.frames[n.substring(p + 1)].document;
            n = n.substring(0, p);
        }
        if (!(x = d[n]) && d.all) x = d.all[n];
        for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
        for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
        if (!x && d.getElementById) x = d.getElementById(n);
        return x;
    }

    function MM_swapImage() { //v3.0
        var i, j = 0, x, a = MM_swapImage.arguments;
        document.MM_sr = new Array;
        for (i = 0; i < (a.length - 2); i += 3)
            if ((x = MM_findObj(a[i])) != null) {
            document.MM_sr[j++] = x;
            if (!x.oSrc) x.oSrc = x.src;
            x.src = a[i + 2];
        }
    }

    function Go_Menu() {
        if (ExistsOpener(window)) {
            if (IsFunction(window.opener.SelfRefresh)) {
                window.opener.SelfRefresh();
            }
            window.close();
            return;
        }
        if (document.title != "ログイン" && document.title != "Resource：メニュー") {
            //alert(document.title);
            // Nakae 2013/05/14 start
            //        var index = getIndex(document.title);
            var index = document.title; // Nakae 2013/05/14 end
            document.location = "<%= Global.APP_PATH %>/Pages/Index.aspx";
        }
    }

    function Go_Logout() {
        if (document.title != "ログイン" && confirm(getMsg("LOGOUT_CONFIRM"))) {
            document.location = "<%= Global.APP_PATH %>/Login.aspx";
        }

    }
    function Go_Register() {
        if (document.title != "登録") {
            document.location = "<%= Global.APP_PATH %>/Pages/MemberRegister.aspx";
        }

    }

    function Go_Help() {
        var strUrl = window.location.href;

        /*var arrUrl=strUrl.split(".aspx");
        var strPage=arrUrl[0]; */
        var arrRUrl = strUrl.split("/");
        var strPage = arrRUrl[arrRUrl.length - 1].trim();
        var arrTe = strPage.split(".");
        var strTranPage = arrTe[0].trim();

        var frameValue = window.location.hash;
        var tranvalue = frameValue.substring(1, frameValue.length);
        if (strTranPage == 'Master') {

            if (tranvalue == "")
                tranvalue = "1";
        }

        CMN_openNewWindow1('<%= Global.APP_PATH %>/Help.aspx?typeid=' + strTranPage + '&indexid=' + tranvalue, 'GO_HELP', 1024, 768);

    }

</script>

<script src="../Scripts/WindowOperate.js" type="text/javascript"> </script>

<link href="../Content/excss.css" rel="stylesheet" type="text/css" />
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td colspan="3" class="titlefont">
            <%--<asp:LinkButton ID="LinkButton1" runat="server"  
        onclick="LinkButton1_Click"></asp:LinkButton>--%>
            <asp:Label ID="lblTime" runat="server" Font-Bold="False"></asp:Label>&nbsp;&nbsp;
            <asp:Label ID="lblName" Font-Bold="true" runat="server"></asp:Label>
        </td>
        <td align="right" class="titlefont">
            <asp:Label ID="lblYear" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td colspan="3">
            <img src="<%= Global.APP_PATH %>/Images/layout/top-left2.gif" width="328" height="31"
                border="0">
        </td>
        <td rowspan="2" width="100%" valign="baseline" align="right" background="<%= Global.APP_PATH %>/Images/layout/background2.gif">
            <a target="_blank" style="cursor: hand" onmouseout=" MM_swapImgRestore() " onmouseover=" MM_swapImage('Image7', '', '<%= Global.APP_PATH %>/Images/layout/button_help_2.gif', 1) "
                onclick=" Go_Help(); ">
                <img name="Image7" border="0" src="<%= Global.APP_PATH %>/Images/layout/button_help_1.gif"></a>
        </td>
    </tr>
    <tr>
        <td>
            <a style="cursor: hand" onmouseout=" MM_swapImgRestore() " onmouseover=" MM_swapImage('Image6', '', '<%= Global.APP_PATH %>/Images/layout/button_home_2.gif', 1) "
                onclick=" Go_Menu(); ">
                <img name="Image6" border="0" src="<%= Global.APP_PATH %>/Images/layout/button_home_1.gif"
                    width="136" height="27"></a>
        </td>
      <%--  <td>
            <a style="cursor: hand" onmouseout=" MM_swapImgRestore() " onmouseover=" MM_swapImage('Image8', '', '<%= Global.APP_PATH %>/Images/layout/button_logout_2.gif', 1) "
                onclick=" Go_Logout(); ">
                <img name="Image8" border="0" src="<%= Global.APP_PATH %>/Images/layout/button_logout_1.gif"
                    width="135" height="27"></a>
        </td>--%>
        <td>
            <a style="cursor: hand" onmouseout=" MM_swapImgRestore() " onmouseover=" MM_swapImage('Image10', '', '<%= Global.APP_PATH %>/Images/layout/button_logout_2.gif', 1) "
                onclick=" Go_Register(); ">
                <img name="Image10" border="0" src="<%= Global.APP_PATH %>/Images/layout/button_logout_1.gif"
                    width="135" height="27"></a>
        </td>
        <td>
            <img border="0" src="<%= Global.APP_PATH %>/Images/layout/top-right2.gif" width="57"
                height="27">
        </td>
    </tr>
</table>
